<template>
  <el-form ref="form" :model="form" :label-width="labelWidth">
    <el-row class="flex" style="flex-wrap: wrap">
      <el-col v-for="item in config" :key="item.prop" :span="item.span || 12" style="padding-right: 40px">
        <el-form-item v-if="item.slot" :label="item.label+'：'" :prop="item.prop">
          <slot :name="item.slot"></slot>
        </el-form-item>
        <el-form-item v-else :label="item.label+'：'" :prop="item.prop">
          {{ form[item.prop] }}
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>
<script>
export default {
  props: {
    labelWidth: {
      type: String,
      default: "90px"
    },
    form: {
      type: Object
    },
    config: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {

    };
  }
};
</script>
